﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using FluentValidation.Results; //下载FluentValidation组件
using MediatR;

namespace NationalD3.Domain.Base
{
    /// <summary>
    /// 抽象命令基类型
    /// </summary>
    public abstract class Command : IRequest
    {
        //命令对象创建日期
        public DateTime Timestamp { get; private set; }

        //验证结果
        public ValidationResult ValidationResult { get; set; }

        //构造方法
        public Command()
        {
            Timestamp = DateTime.Now;
        }

        //是否有效（抽象方法）
        public abstract bool IsValid();
    }
}
